﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Telerik.Web.UI;
using SMA.GENTEv1;

public partial class Protegidos_Pessoas_DadosPessoa__popup_ppDocCTPSHist : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Carrega();
    }
    protected void btnFechar_Click(object sender, EventArgs e)
    {
        ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CancelEdit();", true);
    }

    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        if (!e.IsFromDetailTable)
        {
            Carrega();
        }
    }

    private void Carrega()
    {
        PessoaDocCTPS ctps = new PessoaDocCTPS();
        RadGrid1.DataSource = ctps.SelectPorPessoa(IdPessoa);
    }
}